#pragma once
#include <cstdint>
#include <ECS/Containers/TiledArray.h>

typedef uint8_t TileGID;

struct TileDataDef
{
	TileGID gid;
};

struct TileData
{
	TileGID gid;
	bool isPassable;
	void* userData;
};

class MapData
{
public:
	MapData();
	~MapData();

	void resize(int leftX, int bottomY, int rightX, int topY);

	bool isPassable(int x, int y) const;
	void setPassable(int x, int y, bool passable);

	bool isValid(int x, int y) const;

	void* getUserData(int x, int y);
	void setUserData(int x, int y, void* data);

	int getLeftX() const;
	int getRightX() const;
	int getTopY() const;
	int getBottomY() const;
protected:
	ECS::TiledArray<TileData> _data;
};